package xdu.lz.netty.g_handler.en_decode;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.ReplayingDecoder;

import java.util.List;

/**
 * @author lizhen
 * @date 2019/8/23 14:27
 * @desc 入栈解码处理器
 */
public class MyByteToLongDecoder2 extends ReplayingDecoder<Void> {
    @Override
    protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
        System.out.println("ReplayingDecoder invoke!");
        out.add(in.readLong());
    }
}
